home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / CC_C / 1116.ZIP / TOOLKIT.ARC / PUTRCHAR.H < prev    next >
Text File  |  1979-12-31  |  1KB  |  40 lines

  1.  
  2. /*
  3.    PUTRCHAR.H  written by Wayne Pearson
  4.    This Small C header file uses the ROM BIOS to display a
  5.    character , putrchar(), or a string,putrs() in reverse video
  6.    and then advance the cursor, like putchar() and puts() do.
  7.    int10(ah,al,bh,bl,ch,cl,dh,dl)  is a function in CPCLIB.
  8. */
  9.  
  10. putrchar(r_char)
  11.                 int r_char;
  12.               {
  13.                 int10(9,r_char,0,112,0,1,0,0);
  14.                 #asm
  15.                      MOV  AH,3
  16.                      MOV  CH,0
  17.                      MOV  CL,24
  18.                      INT  10H    ;find cursor location
  19.                      MOV  AH,2
  20.                      ADD  DL,1   ;increment column coordinate
  21.                      INT  10H    ;advance the cursor position
  22.                 #endasm
  23.               }
  24.  
  25. putrs(strng_nm)
  26.                  char strng_nm[];
  27.                {
  28.                  int str_cnt; char str_done; str_done = 'a'; str_cnt = 0;
  29.                  while(str_done != 0)
  30.                                       {
  31.                                         str_done = strng_nm[str_cnt];
  32.                                         putrchar(str_done);  ++str_cnt;
  33.                                       }
  34.                }
  35.  
  36.  
  37.  
  38.  
  39.  
  40.